﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace BuddHa.Common.CryptoOpex.AESUtil
{
    public class AesBuild
    {
        public static IAesDispatch BuildAESDispatch(string key, string iv, PaddingMode paddingMode = PaddingMode.PKCS7, CipherMode cipherMode = CipherMode.ECB)
        {
            if (string.IsNullOrWhiteSpace(key))
            {
                throw new Exception("Build aes disaptch faild! key must not be empty at the same time");
            }
            return new AesDispatch(key, iv, paddingMode, cipherMode);
        }
    }
}
